<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Design_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-design_name" data-rule="required" class="form-control" name="row[design_name]" type="text"
                   value="{$row.design_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-cover_images" data-rule="required" class="form-control" size="50" name="row[cover_images]"
                       type="text" value="{$row.cover_images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-cover_images" class="btn btn-danger faupload"
                                  data-input-id="c-cover_images"
                                  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                  data-multiple="true" data-preview-id="p-cover_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-cover_images" class="btn btn-primary fachoose"
                                  data-input-id="c-cover_images" data-mimetype="image/*" data-multiple="true"><i
                            class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-cover_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-cover_images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Layout_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-layout_ids" data-rule="required" data-source="jy/design/layout" data-multiple="true"
                   class="form-control selectpage" name="row[layout_ids]" type="text" value="{$row.layout_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Style_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-style_ids" data-rule="required" data-source="jy/design/style" class="form-control selectpage"
                   data-multiple="true" name="row[style_ids]" type="text" value="{$row.style_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Space_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-space_ids" data-rule="required" data-source="jy/design/space" data-multiple="true"
                   class="form-control selectpage" name="row[space_ids]" type="text"
                   value="{$row.space_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Product')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_ids" data-rule="required" data-source="jy/product/index"
                   class="form-control selectpage"
                   data-multiple="true" data-live-search='true' data-field="product_name" name="row[product_ids]"
                   type="text" value="{$row.productIds|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详情图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[design_image]" data-template="selectUploadTpl">
                <dd>
                    <ins>名称</ins>
                    <ins>图片</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[design_image]" class="form-control hide" cols="30" rows="5">{$row['designImageJson']}</textarea>
            </dl>
            <!--定义模板-->
            <script type="text/javascript" id="selectUploadTpl">
                {$designImageTpl}
            </script>
            <!---->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Scan_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-scan_count" data-rule="required" class="form-control" name="row[scan_count]" type="number"
                   value="{$row.scan_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Scan_user_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-scan_user_count" data-rule="required" class="form-control" name="row[scan_user_count]"
                   type="number" value="{$row.scan_user_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-share_count" data-rule="required" class="form-control" name="row[share_count]"
                   type="number" value="{$row.share_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share_user_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-share_user_count" data-rule="required" class="form-control" name="row[share_user_count]"
                   type="number" value="{$row.share_user_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Praise_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-praise_count" data-rule="required" class="form-control" name="row[praise_count]" type="number"
                   value="{$row.praise_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Praise_user_count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-praise_user_count" data-rule="required" class="form-control" name="row[praise_user_count]"
                   type="number" value="{$row.praise_user_count|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cover_to_url')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cover_to_url" class="form-control" name="row[cover_to_url]" type="text"
                   value="{$row.cover_to_url|htmlentities}" placeholder="可选">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number"
                   value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}">
                    <input id="row[status]-{$key}" name="row[status]" type="radio"
                           value="{$key}" {in name="key" value="$row.status" }checked{/in}/> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   disabled data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   disabled data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<style>
    .name-input {
        width: 80px !important;
    }

    .plupload.btn {
        margin-left: 2px;
        border-radius: 3px;
    }

    .image-choose {
        margin: 0 3px;
    }

    .btn-remove {
        margin-right: 3px;
    }

    .btn-remove, .btn-dragsort {
        padding: 6px 12px;
    }

    .row:after {
        clear: both;
    }

    .row:before,
    .row:after {
        content: " ";
        display: table;
    }
</style>